package com.liam.design.singleton;

/**
 * 单列模式
 * 饿汉模式
 */
public class SingletonBean {

    /**
     * 构造方法私有化，防止外部new 对象
     */
    private SingletonBean(){

    }

    private static SingletonBean instance = new SingletonBean();

    public static SingletonBean getInstance(){
        return instance;
    }

}
